package com.cr.business.domain;

import com.cr.common.constant.RegConstants;
import com.cr.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.util.Date;

/**
 * 用户主体信息对象 tb_user_entity_info
 * 
 * @author tang
 * @date 2025-08-19
 */
public class TbUserEntityInfo extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主体信息ID */
    private String entityId;

    /** 用户ID */
    private String userId;

    /** 主体名称 */
    @NotBlank(message = "主体名称不能为空！")
    private String entityName;

    /** 主体类型 */
    @NotBlank(message = "主体类型不能为空！")
    private String entityType;

    /** 主体行业 */
    @NotBlank(message = "主体行业不能为空！")
    private String entityIndustry;

    /** 证件类型 */
    private String certType;

    /** 社会信用代码 */
    private String socialCreditCode;

    /** 主体属性 */
    @NotBlank(message = "主体属性类型不能为空！")
    private String entityAttr;

    /** 营业期限 起 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "营业期限开始日期不能为空！")
    private Date timeLimitStart;

    /** 营业期限 止 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date timeLimitEnd;

    /** 是否长期（0-否，1-是） */
    private String permanentlyFlag;

    /** 省 */
    @NotBlank(message = "所属省不能为空！")
    private String province;

    /** 市 */
    @NotBlank(message = "所属市不能为空！")
    private String city;

    /** 区县 */
    @NotBlank(message = "所属区县不能为空！")
    private String district;

    /** 镇 */
    @NotBlank(message = "所属乡镇不能为空！")
    private String town;

    /** 村 */
    @NotBlank(message = "所属村不能为空！")
    private String village;

    /** 详细地址 */
    @NotBlank(message = "详细地址不能为空！")
    private String address;

    /** 经度 */
    @NotBlank(message = "经度不能为空！")
    private String longitude;

    /** 纬度 */
    @NotBlank(message = "纬度不能为空！")
    private String latitude;

    /** 是否国家级示范区（0-否，1-是） */
    private String demonstrationZoneFlag;

    /** 是否龙头企业（0-否，1-是） */
    private String leadingFlag;

    /** 上市时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date marketTime;

    /** 辐射带动基地 */
    private String driveBase;

    /** 农牧户数 */
    private Long households;

    /** 商标类型 */
    private String trademark;

    /** 内检员 */
    private String internalInspector;

    /** 内检员手机号码 */
    @Pattern(regexp = RegConstants.PHONE_NUMBER, message = "内检员手机号码格式有误！")
    private String internalInspectorPhone;

    /** 主体简介 */
    private String entityIntroduce;

    /** 法人姓名 */
    private String legalPerson;

    /** 法人证件类型 */
    private String legalPersonCertType;

    /** 法人证件号码 */
    @Pattern(regexp = RegConstants.ID_CARD, message = "法人证件号码格式有误！")
    private String legalPersonCertNo;

    /** 法人联系号码 */
    @Pattern(regexp = RegConstants.PHONE_NUMBER, message = "法人手机号格式有误！")
    private String legalPersonPhone;

    /** 联系人 */
    private String liaisonMan;

    /** 联系人证件类型 */
    private String liaisonManCertType;

    /** 联系人证件号码 */
    @Pattern(regexp = RegConstants.ID_CARD, message = "联系人证件号码格式有误！")
    private String liaisonManCertNo;

    /** 联系人号码 */
    @Pattern(regexp = RegConstants.PHONE_NUMBER, message = "联系人手机号格式有误！")
    private String liaisonManPhone;

    /** 联系人邮箱 */
    @Pattern(regexp = RegConstants.EMAIL, message = "联系人邮箱格式有误！")
    private String liaisonManEmail;

    /** 联系人传真 */
    private String liaisonManFax;

    /** 主体照片地址 */
    private String entityPhoto;

    /** 主体证照地址 */
    private String entityCert;

    /** 认证状态（0-未认证，1-已认证，2-审核中，3-审核失败） */
    private String authStatus;

    /** 认证提交日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date authSubmitTime;

    /** 认证日期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date authTime;

    /** 认证未通过原因 */
    private String authFailReason;

    /** 删除标识（0-正常，2-删除） */
    private String delFlag;

    /** 状态（0-正常，1-停产，2-注销） */
    private String status;

    /** 是否最新（0-是，1-否） */
    private String latestFlag;

    public void setEntityId(String entityId) 
    {
        this.entityId = entityId;
    }

    public String getEntityId() 
    {
        return entityId;
    }

    public void setUserId(String userId) 
    {
        this.userId = userId;
    }

    public String getUserId() 
    {
        return userId;
    }

    public void setEntityName(String entityName) 
    {
        this.entityName = entityName;
    }

    public String getEntityName() 
    {
        return entityName;
    }

    public void setEntityType(String entityType) 
    {
        this.entityType = entityType;
    }

    public String getEntityType() 
    {
        return entityType;
    }

    public void setCertType(String certType) 
    {
        this.certType = certType;
    }

    public String getCertType() 
    {
        return certType;
    }

    public void setSocialCreditCode(String socialCreditCode) 
    {
        this.socialCreditCode = socialCreditCode;
    }

    public String getSocialCreditCode() 
    {
        return socialCreditCode;
    }

    public void setEntityAttr(String entityAttr) 
    {
        this.entityAttr = entityAttr;
    }

    public String getEntityAttr() 
    {
        return entityAttr;
    }

    public void setTimeLimitStart(Date timeLimitStart)
    {
        this.timeLimitStart = timeLimitStart;
    }

    public Date getTimeLimitStart()
    {
        return timeLimitStart;
    }

    public void setTimeLimitEnd(Date timeLimitEnd)
    {
        this.timeLimitEnd = timeLimitEnd;
    }

    public Date getTimeLimitEnd()
    {
        return timeLimitEnd;
    }

    public void setPermanentlyFlag(String permanentlyFlag) 
    {
        this.permanentlyFlag = permanentlyFlag;
    }

    public String getPermanentlyFlag() 
    {
        return permanentlyFlag;
    }

    public void setProvince(String province) 
    {
        this.province = province;
    }

    public String getProvince() 
    {
        return province;
    }

    public void setCity(String city) 
    {
        this.city = city;
    }

    public String getCity() 
    {
        return city;
    }

    public void setDistrict(String district) 
    {
        this.district = district;
    }

    public String getDistrict() 
    {
        return district;
    }

    public void setTown(String town) 
    {
        this.town = town;
    }

    public String getTown() 
    {
        return town;
    }

    public void setVillage(String village) 
    {
        this.village = village;
    }

    public String getVillage() 
    {
        return village;
    }

    public void setAddress(String address) 
    {
        this.address = address;
    }

    public String getAddress() 
    {
        return address;
    }

    public void setLongitude(String longitude) 
    {
        this.longitude = longitude;
    }

    public String getLongitude() 
    {
        return longitude;
    }

    public void setLatitude(String latitude) 
    {
        this.latitude = latitude;
    }

    public String getLatitude() 
    {
        return latitude;
    }

    public void setDemonstrationZoneFlag(String demonstrationZoneFlag) 
    {
        this.demonstrationZoneFlag = demonstrationZoneFlag;
    }

    public String getDemonstrationZoneFlag() 
    {
        return demonstrationZoneFlag;
    }

    public void setLeadingFlag(String leadingFlag) 
    {
        this.leadingFlag = leadingFlag;
    }

    public String getLeadingFlag() 
    {
        return leadingFlag;
    }

    public void setMarketTime(Date marketTime) 
    {
        this.marketTime = marketTime;
    }

    public Date getMarketTime() 
    {
        return marketTime;
    }

    public void setDriveBase(String driveBase) 
    {
        this.driveBase = driveBase;
    }

    public String getDriveBase() 
    {
        return driveBase;
    }

    public void setHouseholds(Long households) 
    {
        this.households = households;
    }

    public Long getHouseholds() 
    {
        return households;
    }

    public void setTrademark(String trademark) 
    {
        this.trademark = trademark;
    }

    public String getTrademark() 
    {
        return trademark;
    }

    public void setInternalInspector(String internalInspector) 
    {
        this.internalInspector = internalInspector;
    }

    public String getInternalInspector() 
    {
        return internalInspector;
    }

    public void setInternalInspectorPhone(String internalInspectorPhone) 
    {
        this.internalInspectorPhone = internalInspectorPhone;
    }

    public String getInternalInspectorPhone() 
    {
        return internalInspectorPhone;
    }

    public void setEntityIntroduce(String entityIntroduce) 
    {
        this.entityIntroduce = entityIntroduce;
    }

    public String getEntityIntroduce() 
    {
        return entityIntroduce;
    }

    public void setLegalPerson(String legalPerson) 
    {
        this.legalPerson = legalPerson;
    }

    public String getLegalPerson() 
    {
        return legalPerson;
    }

    public void setLegalPersonCertType(String legalPersonCertType) 
    {
        this.legalPersonCertType = legalPersonCertType;
    }

    public String getLegalPersonCertType() 
    {
        return legalPersonCertType;
    }

    public void setLegalPersonCertNo(String legalPersonCertNo) 
    {
        this.legalPersonCertNo = legalPersonCertNo;
    }

    public String getLegalPersonCertNo() 
    {
        return legalPersonCertNo;
    }

    public void setLegalPersonPhone(String legalPersonPhone) 
    {
        this.legalPersonPhone = legalPersonPhone;
    }

    public String getLegalPersonPhone() 
    {
        return legalPersonPhone;
    }

    public void setLiaisonMan(String liaisonMan) 
    {
        this.liaisonMan = liaisonMan;
    }

    public String getLiaisonMan() 
    {
        return liaisonMan;
    }

    public void setLiaisonManCertType(String liaisonManCertType) 
    {
        this.liaisonManCertType = liaisonManCertType;
    }

    public String getLiaisonManCertType() 
    {
        return liaisonManCertType;
    }

    public void setLiaisonManCertNo(String liaisonManCertNo) 
    {
        this.liaisonManCertNo = liaisonManCertNo;
    }

    public String getLiaisonManCertNo() 
    {
        return liaisonManCertNo;
    }

    public void setLiaisonManPhone(String liaisonManPhone) 
    {
        this.liaisonManPhone = liaisonManPhone;
    }

    public String getLiaisonManPhone() 
    {
        return liaisonManPhone;
    }

    public void setLiaisonManEmail(String liaisonManEmail) 
    {
        this.liaisonManEmail = liaisonManEmail;
    }

    public String getLiaisonManEmail() 
    {
        return liaisonManEmail;
    }

    public void setLiaisonManFax(String liaisonManFax) 
    {
        this.liaisonManFax = liaisonManFax;
    }

    public String getLiaisonManFax() 
    {
        return liaisonManFax;
    }

    public void setEntityPhoto(String entityPhoto)
    {
        this.entityPhoto = entityPhoto;
    }

    public String getEntityPhoto()
    {
        return entityPhoto;
    }

    public void setEntityCert(String entityCert) 
    {
        this.entityCert = entityCert;
    }

    public String getEntityCert() 
    {
        return entityCert;
    }

    public void setAuthStatus(String authStatus) 
    {
        this.authStatus = authStatus;
    }

    public String getAuthStatus() 
    {
        return authStatus;
    }

    public void setAuthSubmitTime(Date authSubmitTime) 
    {
        this.authSubmitTime = authSubmitTime;
    }

    public Date getAuthSubmitTime() 
    {
        return authSubmitTime;
    }

    public void setAuthTime(Date authTime) 
    {
        this.authTime = authTime;
    }

    public Date getAuthTime() 
    {
        return authTime;
    }

    public void setAuthFailReason(String authFailReason) 
    {
        this.authFailReason = authFailReason;
    }

    public String getAuthFailReason() 
    {
        return authFailReason;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getEntityIndustry() {
        return entityIndustry;
    }

    public void setEntityIndustry(String entityIndustry) {
        this.entityIndustry = entityIndustry;
    }

    public String getLatestFlag() {
        return latestFlag;
    }

    public void setLatestFlag(String latestFlag) {
        this.latestFlag = latestFlag;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("entityId", getEntityId())
            .append("userId", getUserId())
            .append("entityName", getEntityName())
            .append("entityType", getEntityType())
            .append("certType", getCertType())
            .append("entityIndustry", getEntityIndustry())
            .append("socialCreditCode", getSocialCreditCode())
            .append("entityAttr", getEntityAttr())
            .append("timeLimitStart", getTimeLimitStart())
            .append("timeLimitEnd", getTimeLimitEnd())
            .append("permanentlyFlag", getPermanentlyFlag())
            .append("province", getProvince())
            .append("city", getCity())
            .append("district", getDistrict())
            .append("town", getTown())
            .append("village", getVillage())
            .append("address", getAddress())
            .append("longitude", getLongitude())
            .append("latitude", getLatitude())
            .append("demonstrationZoneFlag", getDemonstrationZoneFlag())
            .append("leadingFlag", getLeadingFlag())
            .append("marketTime", getMarketTime())
            .append("driveBase", getDriveBase())
            .append("households", getHouseholds())
            .append("trademark", getTrademark())
            .append("internalInspector", getInternalInspector())
            .append("internalInspectorPhone", getInternalInspectorPhone())
            .append("entityIntroduce", getEntityIntroduce())
            .append("legalPerson", getLegalPerson())
            .append("legalPersonCertType", getLegalPersonCertType())
            .append("legalPersonCertNo", getLegalPersonCertNo())
            .append("legalPersonPhone", getLegalPersonPhone())
            .append("liaisonMan", getLiaisonMan())
            .append("liaisonManCertType", getLiaisonManCertType())
            .append("liaisonManCertNo", getLiaisonManCertNo())
            .append("liaisonManPhone", getLiaisonManPhone())
            .append("liaisonManEmail", getLiaisonManEmail())
            .append("liaisonManFax", getLiaisonManFax())
            .append("entityPhoto", getEntityPhoto())
            .append("entityCert", getEntityCert())
            .append("authStatus", getAuthStatus())
            .append("authSubmitTime", getAuthSubmitTime())
            .append("authTime", getAuthTime())
            .append("authFailReason", getAuthFailReason())
            .append("delFlag", getDelFlag())
            .append("status", getStatus())
            .append("latestFlag", getLatestFlag())
            .toString();
    }
}
